The present invention relates to a method of modifying data in an encoded data signal, comprising at least:
a decoding step for decoding said encoded data signal and providing a decoded data signal,
a re-encoding step performed on a modified data signal.
The invention also relates to video processing devices for carrying out said method. This invention may be used, for instance, when a broadcaster wants to introduce additional data into a sequence of coded pictures. This invention finds applications not just in the field of MPEG-2 compression, but more generally in any digital video data compression system.
Modifying data in an encoded data signal has become a vital function in studio editing environments. A possible solution has been proposed in the international patent application WO 99/51033 (PHF98546). This patent application describes a method and its corresponding device for modifying data in an encoded data signal. This method allows an additional data signal insertion, e.g. a logo insertion, in an MPEG-2 bitstream by means of bit rate transcoding. Logo insertion comes as an extension of the bit rate transcoder. The corresponding diagram, depicted in FIG. 1, comprises a transcoding module 101 and a logo addition branch 102. The general outline of the transcoding module 101, well known to a person skilled in the art, comprises:
a partial decoding branch 119 for receiving the input signal 128 and providing a decoded data signal Error_Ixe2x80x2(n), also called error residue. This branch comprises in series a variable length decoding 107, an inverse quantization 108 providing a decoded data signal Error_I(n) in the frequential domain, and an inverse discrete cosine transform (IDCT) 109 for providing a decoded data signal Error_Ixe2x80x2(n) in the pixel domain.
a re-encoding branch 121 for providing an output signal 129 and generating a coding error. Said re-encoding branch, acting on the modified data signal Axe2x80x2(n) for providing said output signal 129, comprises in series a discrete cosine transform (DCT) 110, a quantization 111, a variable length coding 112 followed by a buffer 113, and regulation means 114 ensuring a constant picture quality of the output signal 129. A local decoding is also performed inside said re-encoding branch. It comprises in series an inverse quantization 115 followed by an inverse discrete cosine transform 116. A subtracting sub-step is performed for providing said coding error resulting from the difference between the output signal of said sub-step 116 and said signal Axe2x80x2(n).
an intermediate branch 120 comprising a motion compensation 105 using motion vectors V(n) of the input signal, its associated memory 106 storing a previous signal, and a second subtracter 124. This branch, also called prediction loop, avoids the quality drift in the output signal 129 by subtracting the motion-compensated coding error from said decoded data signal, by means of subtracting sub-step 124.
The logo addition branch 102 is implemented through to the addition of a pixel-based residual signal to the decoded signal Error_Ixe2x80x2(n) by means of the adding sub-step 122. This branch provides a pixel-based residual signal resulting from the subtraction between an additional data signal Logo(n) referenced 130 and a motion-compensated logo predicted signal PRED(Logo(nxe2x88x921), V(n)) referenced 127, obtained by means of the motion compensation sub-step 103 and based on reference pictures containing logo previously stored in memory 104 with the use of the same vectors V(n) as the main input signal.
In the prior art diagram depicted in FIG. 1, two inverse discrete cosine transforms designated as 109 and 116 are performed, as well as one discrete cosine transform designated as 110. The first inverse discrete cosine transform 109 is applied to dequantized frequential coefficients obtained after the inverse quantization 108. Said sub-step 109 allows to access in the pixel domain to access a pixel-based error residue relative to the input signal 128 and thus to perform the data addition in the pixel domain by means of the adding sub-step 122. The pixel-based signal resulting from this addition, after subtraction of the drift correction signal generated by 105, is then re-encoded by processing means. To this end, the discrete cosine transform 110 is dedicated to convert pixel-based data into frequential data, said frequential data being afterwards quantized and entropy-coded in order to generate the output signal 129. A second inverse discrete cosine transform 116 is also done in the re-encoding branch so that the motion compensation 105 is performed on pixel-based data. Such DCT/IDCT are block-based processes performed on 8*8 pixel blocks defining the respective data content of each picture in the pixel/frequential domain. Dealing with the so-called widespread 4:2:0-625 or 4:2:2-625 video formats, each picture is defined by a large number of 8*8 blocks whose DCT/IDCT processes lead to a dramatically high CPU load. Indeed, such processes necessitating a huge quantity of addition-multiplication steps of high resolution, they can only be done with powerful digital signal processors, thus excluding the definition of relatively low-cost devices or products. This prior art solution then remains expensive in terms of the CPU load, which also results in a lack of flexibility in its hardware implementation.
It is an object of the invention to provide a method of modifying data in an encoded data signal, derived from the prior art, which imposes a lesser burden on central processing units (CPU).
In a first application, the method of modifying data according to the invention is characterized in that it comprises:
a conversion step for providing a frequential residual signal resulting from the frequential conversion of said pixel-based residual signal, said frequential residual signal being added to said decoded data signal,
a sub-step for adding said frequential residual signal to said decoded data signal so as to provide said modified data signal.
In a second application, the method of modifying data according to the invention, comprising an intermediate step providing a motion-compensated signal from said coding error, is characterized in that said motion-compensated signal is subtracted from said modified data signal before said re-encoding step.
In a third application, the method of modifying data according to the invention, comprising a residual signal resulting from the difference between an additional data signal and its predicted version, is characterized in that it comprises sub-steps for inserting said additional data signal into said intermediate step.
In a fourth application, the method of modifying data according to the invention is characterized in that it comprises a sub-step for adding said additional data signal to said modified data signal before said re-encoding step.
The corresponding diagrams, depicted in FIG. 2 to FIG. 7, respectively, are based on data addition of the additional data signal 130 to the decoded data signal relative to the input data signal or to a signal situated in the transcoder drift correction loop by means of said adding or subtracting sub-steps.
According to the invention, compared with the prior art solution, CPU-consuming DCT/IDCT sub-steps are replaced with DCT/IDCT sub-steps involving a limited load on the CPU, in return for which the structure of the data insertion is modified, such simplifications being possible in that advantage is taking of combinations between different sub-steps and in using their own properties, such as the linearity of the motion compensation or the distributivity of DCT as compared with addition. The invention thus comprises a minimum number of functional sub-steps, which results in a cost-effective solution.
Another object of the invention is to propose devices for implementing the above-mentioned methods.
To this end, in a first implementation, the invention relates to a transcoding device for adding data to an encoded data signal, characterized in that it comprises:
conversion means for providing a frequential residual signal resulting from the frequential conversion of said pixel-based residual signal, said frequential residual signal being added to said decoded data signal,
means for adding said frequential residual signal to said decoded data signal so as to provide said modified data signal.
In a second implementation, the invention relates to a transcoding device for adding data to an encoded data signal characterized in that it comprises data insertion means for inserting a modifying data signal into said intermediary branch.
In a third implementation, the invention relates to a transcoding device for adding data to an encoded data signal, characterized in that it comprises means for adding an additional data signal to said modified data signal before said re-encoding.
Detailed explanations and other aspects of the invention will be given below.